import {postWithinAuth} from '../../frame/ajax'
// import {getWithinAuth, postWithinAuth, getWithoutAuth} from '../../frame/ajax'
import {getUrl} from '../../frame/apiConfigMenber'

// 绑定活动上线id
export const activitiesBinding = ({ dispatch }, parentId) => {
  return new Promise(
    (resolve, reject) => {
      postWithinAuth({
        url: getUrl('activities_bind_id'),
        data: parentId
      }).then(
        function (ret) {
          console.log('绑定成功', ret);
          // window.alert('上线绑定成功')
          resolve()
        },
        function (err) {
          console.log('没绑定成功');
          // window.alert('上线没绑定成功')
          reject(err)
        }
      )
    }
  )
}
